﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace WSPDocumentBuilder_WPF.Managers
{
    public static class LocationManager
    {
        private static string _dataPath = string.Empty;
        /// <summary>
        /// Localisation du fichier de données
        /// </summary>
        public static string DataPath
        {
            get
            {
                if (string.IsNullOrEmpty(_dataPath))
                {
                    _dataPath = Directory.GetCurrentDirectory() + @"\Data";
                    if (!Directory.Exists(_dataPath))
                    {
                        Directory.CreateDirectory(_dataPath);
                    }
                }

                return _dataPath;
            }
        }

        private static string _xslPath = string.Empty;
        /// <summary>
        /// Localisation du dossier contenant les fichiers Xslt
        /// </summary>
        public static string XslPath
        {
            get
            {
                if (string.IsNullOrEmpty(_xslPath))
                {
                    _xslPath = Directory.GetCurrentDirectory() + @"\Xslt"; //@"D:\@@\Xslt";
                }

                return _xslPath;
            }
        }
    }
}
